<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: inc.get_product_link.php 373 2014-01-18 11:21:16Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 373 $
* 	zuletzt geaendert von:	$Author: $
* 	Datum:					$Date: 2014-01-18 11:21:16 +0000 (Sat, 18 Jan 2014) $
*
* 	extends by dirk.mueller (edv-mueller.com)
* 	http://www.itdotmedia.de
*
* --------------------------------------------------------------------------------------
* 	based on:
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
* 	Copyright (c) since 2011 SEO:mercari
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

require_once(DIR_FS_INC.'inc.href_link.php');

function get_product_link($products_id, $kind) {
	$link = href_link('product_info.php', 'products_id='.$products_id);
	
	if ($kind == 'flat')
		return $link;
	
	if ($kind == 'konfigurator') {
		$link_array = explode('/', $link);
    $link_product = array_pop($link_array);
    $link = implode('/', array_merge($link_array, array('konfigurator_stuhl', $link_product)));
    return $link;
  }
  
}	
